<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>bfsNet: Fichero Fuente /Users/nicolunacba/Development/Dinic/trunk/network/hashtbl.h</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generado por Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Buscar');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="bfs-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">bfsNet&#160;<span id="projectnumber">1.0</span></div>
   <div id="projectbrief">Algoritmo BFS para encontrar un camino de fuente a destino en una Network</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Página&#160;principal</span></a></li>
      <li><a href="annotated.html"><span>Estructuras&#160;de&#160;Datos</span></a></li>
      <li class="current"><a href="files.html"><span>Archivos</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Buscar" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Lista&#160;de&#160;archivos</span></a></li>
      <li><a href="globals.html"><span>Globales</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('hashtbl_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">/Users/nicolunacba/Development/Dinic/trunk/network/hashtbl.h</div>  </div>
</div>
<div class="contents">
<a href="hashtbl_8h.html">Ir a la documentación de este archivo.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* Copyright (c) 2011 the authors listed at the following URL, and/or</span>
<a name="l00002"></a>00002 <span class="comment">the authors of referenced articles or incorporated external code:</span>
<a name="l00003"></a>00003 <span class="comment">http://en.literateprograms.org/Hash_table_(C)?action=history&amp;offset=20100620072342</span>
<a name="l00004"></a>00004 <span class="comment"></span>
<a name="l00005"></a>00005 <span class="comment">Permission is hereby granted, free of charge, to any person obtaining</span>
<a name="l00006"></a>00006 <span class="comment">a copy of this software and associated documentation files (the</span>
<a name="l00007"></a>00007 <span class="comment">&quot;Software&quot;), to deal in the Software without restriction, including</span>
<a name="l00008"></a>00008 <span class="comment">without limitation the rights to use, copy, modify, merge, publish,</span>
<a name="l00009"></a>00009 <span class="comment">distribute, sublicense, and/or sell copies of the Software, and to</span>
<a name="l00010"></a>00010 <span class="comment">permit persons to whom the Software is furnished to do so, subject to</span>
<a name="l00011"></a>00011 <span class="comment">the following conditions:</span>
<a name="l00012"></a>00012 <span class="comment"></span>
<a name="l00013"></a>00013 <span class="comment">The above copyright notice and this permission notice shall be</span>
<a name="l00014"></a>00014 <span class="comment">included in all copies or substantial portions of the Software.</span>
<a name="l00015"></a>00015 <span class="comment"></span>
<a name="l00016"></a>00016 <span class="comment">THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND,</span>
<a name="l00017"></a>00017 <span class="comment">EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF</span>
<a name="l00018"></a>00018 <span class="comment">MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.</span>
<a name="l00019"></a>00019 <span class="comment">IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY</span>
<a name="l00020"></a>00020 <span class="comment">CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,</span>
<a name="l00021"></a>00021 <span class="comment">TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE</span>
<a name="l00022"></a>00022 <span class="comment">SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</span>
<a name="l00023"></a>00023 <span class="comment"></span>
<a name="l00024"></a>00024 <span class="comment">Retrieved from: http://en.literateprograms.org/Hash_table_(C)?oldid=16749</span>
<a name="l00025"></a>00025 <span class="comment">*/</span>
<a name="l00026"></a>00026 
<a name="l00027"></a>00027 <span class="preprocessor">#ifndef HASHTBL_H_INCLUDE_GUARD</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define HASHTBL_H_INCLUDE_GUARD</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span>
<a name="l00030"></a>00030 <span class="preprocessor">#include&lt;stdlib.h&gt;</span>
<a name="l00031"></a>00031 
<a name="l00033"></a><a class="code" href="hashtbl_8h.html#a0e1e919c9c3e5da2862baf08fa7f9e28">00033</a> <span class="keyword">typedef</span> <span class="keywordtype">size_t</span> <a class="code" href="hashtbl_8h.html#a0e1e919c9c3e5da2862baf08fa7f9e28">hash_size</a>;
<a name="l00034"></a>00034 
<a name="l00036"></a><a class="code" href="structhashnode__s.html">00036</a> <span class="keyword">struct </span><a class="code" href="structhashnode__s.html">hashnode_s</a> {
<a name="l00038"></a><a class="code" href="structhashnode__s.html#a5892a9181e6a332f84d27aecd41dcd12">00038</a>         <span class="keywordtype">char</span> *<a class="code" href="structhashnode__s.html#a5892a9181e6a332f84d27aecd41dcd12">key</a>;
<a name="l00040"></a><a class="code" href="structhashnode__s.html#a735984d41155bc1032e09bece8f8d66d">00040</a>         <span class="keywordtype">void</span> *<a class="code" href="structhashnode__s.html#a735984d41155bc1032e09bece8f8d66d">data</a>;
<a name="l00042"></a><a class="code" href="structhashnode__s.html#aabb745bae27cc9bf27db56c5c56e9f39">00042</a>         <span class="keyword">struct </span><a class="code" href="structhashnode__s.html">hashnode_s</a> *<a class="code" href="structhashnode__s.html#aabb745bae27cc9bf27db56c5c56e9f39">next</a>;
<a name="l00043"></a>00043 };
<a name="l00044"></a>00044 
<a name="l00046"></a><a class="code" href="structhashtbl.html">00046</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structhashtbl.html">hashtbl</a> {
<a name="l00048"></a><a class="code" href="structhashtbl.html#a1b34d3db5a62a9a55a554689a6a8234e">00048</a>         <a class="code" href="hashtbl_8h.html#a0e1e919c9c3e5da2862baf08fa7f9e28">hash_size</a> <a class="code" href="structhashtbl.html#a1b34d3db5a62a9a55a554689a6a8234e">size</a>;
<a name="l00050"></a><a class="code" href="structhashtbl.html#ad211d1fc97e38c179b3906954ba750fd">00050</a>         <span class="keyword">struct </span><a class="code" href="structhashnode__s.html">hashnode_s</a> **<a class="code" href="structhashtbl.html#ad211d1fc97e38c179b3906954ba750fd">nodes</a>;
<a name="l00052"></a><a class="code" href="structhashtbl.html#afa90606d4ebad0d4cba6602e6f3161cb">00052</a>         <a class="code" href="hashtbl_8h.html#a0e1e919c9c3e5da2862baf08fa7f9e28">hash_size</a> (*<a class="code" href="structhashtbl.html#afa90606d4ebad0d4cba6602e6f3161cb">hashfunc</a>)(<span class="keyword">const</span> <span class="keywordtype">char</span> *);
<a name="l00053"></a>00053 } <a class="code" href="hashtbl_8h.html#a2d56212ef7b0fa938889e49a688e46ab">HASHTBL</a>;
<a name="l00054"></a>00054 
<a name="l00056"></a>00056 <a class="code" href="structhashtbl.html">HASHTBL</a> *<a class="code" href="hashtbl_8c.html#aa7e342f8612905f6d59e444d82b52954">hashtbl_create</a>(<a class="code" href="hashtbl_8h.html#a0e1e919c9c3e5da2862baf08fa7f9e28">hash_size</a> size, <a class="code" href="hashtbl_8h.html#a0e1e919c9c3e5da2862baf08fa7f9e28">hash_size</a> (*hashfunc)(<span class="keyword">const</span> <span class="keywordtype">char</span> *));
<a name="l00057"></a>00057 
<a name="l00059"></a>00059 <span class="keywordtype">void</span> <a class="code" href="hashtbl_8c.html#a4c57259cd505c293809adf10fa98cd7a">hashtbl_destroy</a>(<a class="code" href="structhashtbl.html">HASHTBL</a> *<a class="code" href="structhashtbl.html">hashtbl</a>);
<a name="l00060"></a>00060 
<a name="l00062"></a>00062 <span class="keywordtype">int</span> <a class="code" href="hashtbl_8c.html#a6b2853739dee3d59dcca062d62ac4600">hashtbl_insert</a>(<a class="code" href="structhashtbl.html">HASHTBL</a> *<a class="code" href="structhashtbl.html">hashtbl</a>, <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structhashnode__s.html#a5892a9181e6a332f84d27aecd41dcd12">key</a>, <span class="keywordtype">void</span> *<a class="code" href="structhashnode__s.html#a735984d41155bc1032e09bece8f8d66d">data</a>);
<a name="l00063"></a>00063 
<a name="l00065"></a>00065 <span class="keywordtype">int</span> <a class="code" href="hashtbl_8c.html#a5e5873b1bc7ddb5cf6d279205eaf64ff">hashtbl_remove</a>(<a class="code" href="structhashtbl.html">HASHTBL</a> *<a class="code" href="structhashtbl.html">hashtbl</a>, <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structhashnode__s.html#a5892a9181e6a332f84d27aecd41dcd12">key</a>);
<a name="l00066"></a>00066 
<a name="l00068"></a>00068 <span class="keywordtype">void</span> *<a class="code" href="hashtbl_8c.html#a09a188d83a55ba59116a7c301c032a68">hashtbl_get</a>(<a class="code" href="structhashtbl.html">HASHTBL</a> *<a class="code" href="structhashtbl.html">hashtbl</a>, <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structhashnode__s.html#a5892a9181e6a332f84d27aecd41dcd12">key</a>);
<a name="l00069"></a>00069 
<a name="l00071"></a>00071 <span class="keywordtype">int</span> <a class="code" href="hashtbl_8c.html#a460651cb9ee95096d0a37ad691b8966c">hashtbl_resize</a>(<a class="code" href="structhashtbl.html">HASHTBL</a> *<a class="code" href="structhashtbl.html">hashtbl</a>, <a class="code" href="hashtbl_8h.html#a0e1e919c9c3e5da2862baf08fa7f9e28">hash_size</a> size);
<a name="l00072"></a>00072 
<a name="l00073"></a>00073 
<a name="l00074"></a>00074 <span class="preprocessor">#endif</span>
<a name="l00075"></a>00075 <span class="preprocessor"></span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="hashtbl_8h.html">hashtbl.h</a>      </li>
      <li class="footer">Generado el Miércoles, 13 de Abril de 2011 20:34:14 para bfsNet por&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>Todo</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Estructuras de Datos</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Archivos</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Funciones</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>&apos;typedefs&apos;</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>&apos;defines&apos;</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


</body>
</html>
